//
//  ActivityTableViewCell.m
//  UI14_豆瓣电影更新版
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "ActivityTableViewCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation ActivityTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatCell];
    }
    return self;
}

- (void)dealloc {
    [_label1 release];
    [_label2 release];
    [_label3 release];
    [_label4 release];
    [_dataLabel release];
    [_spotLabel release];
    [_catalogLabel release];
    [_im release];
    [_im2 release];
    [_im3 release];
    [_nameLabel release];
    [_img release];
    [_img2 release];
    [_img3 release];
    [super dealloc ];
}

- (void)creatCell {
    self.img = [[UIImageView alloc] init];
    [self.contentView addSubview:_img];
    [_img release];
    
    self.img2 = [[UIImageView alloc] init];
    [self.contentView addSubview:_img2];
    [_img2 release];
    
    self.img3 = [[UIImageView alloc] init];
    [self.contentView addSubview:_img3];
    [_img3 release];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    [_nameLabel release];
    
    self.im = [[UIImageView alloc] init];
    [self.contentView addSubview:_im];
    [_im release];
    
    self.im2 = [[UIImageView alloc] init];
    [self.contentView addSubview:_im2];
    [_im2 release];
    
    self.im3 = [[UIImageView alloc] init];
    [self.contentView addSubview:_im3];
    [_im3 release];
    
    self.dataLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_dataLabel];
    [_dataLabel release];
    
    self.spotLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_spotLabel];
    [_spotLabel release];
    
    self.catalogLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_catalogLabel];
    [_catalogLabel release];
    
    self.label1 = [[UILabel alloc] init];
    [self.contentView addSubview:_label1];
    [_label1 release];
    
    self.label2 = [[UILabel alloc] init];
    [self.contentView addSubview:_label2];
    [_label2 release];
    
    self.label3 = [[UILabel alloc] init];
    [self.contentView addSubview:_label3];
    [_label3 release];
    
    self.label4 = [[UILabel alloc] init];
    [self.contentView addSubview:_label4];
    [_label4 release];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    _img.frame = CGRectMake(10, 10, WIDTH - 20, HEIGHT - 20);
    _img.image = [UIImage imageNamed:@"bg_eventlistcell@2x.png"];
    
    _img2.frame = CGRectMake(15, 50, WIDTH - 30, HEIGHT - 65);
    _img2.image = [UIImage imageNamed:@"bg_share_large.png"];
    
    _img3.frame = CGRectMake(WIDTH - 128, 55, 105, 130);
//    _img3.image = [UIImage imageNamed:@"picholder@2x.png"];
    
    _nameLabel.frame = CGRectMake(20, 15, WIDTH - 40, 30);
//    _nameLabel.backgroundColor = [UIColor redColor];
    
    // 时间图标
    _im.frame = CGRectMake(25, 55, 30, 30);
//    _im.backgroundColor = [UIColor redColor];
    _im.image = [UIImage imageNamed:@"icon_date@2x.png"];
    // 地址图标
    _im2.frame = CGRectMake(25, 85, 30, 30);
//    _im2.backgroundColor = [UIColor redColor];
    _im2.image = [UIImage imageNamed:@"icon_spot@2x.png"];
    
    
    // 类型图标
    _im3.frame = CGRectMake(25, 115, 30, 30);
//    _im3.backgroundColor = [UIColor redColor];
    _im3.image = [UIImage imageNamed:@"icon_catalog@2x.png"];
    
    // 时间
    _dataLabel.frame = CGRectMake(60, 55, WIDTH - 65 - 128, 30);
//    _dataLabel.backgroundColor = [UIColor redColor];
    
    // 地址
    _spotLabel.frame = CGRectMake(60, 85, WIDTH - 65 - 128, 30);
//    _spotLabel.backgroundColor = [UIColor yellowColor];
    
    // 类型
    _catalogLabel.frame = CGRectMake(60, 115, WIDTH- 65 - 128, 30);
//    _catalogLabel.backgroundColor = [UIColor cyanColor];
    
    _label1.frame = CGRectMake(25, 145, 60, 30);
//    _label1.backgroundColor = [UIColor redColor];
    _label2.frame = CGRectMake(90, 145, 70, 30);
//    _label2.backgroundColor = [UIColor yellowColor];
    
    _label3.frame = CGRectMake(160, 145, 55, 30);
//    _label3.backgroundColor = [UIColor redColor];
    _label4.frame = CGRectMake(210, 145, 70, 30);
//    _label4.backgroundColor = [UIColor yellowColor];
}











- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
